import { ApiPropertyOptional } from "@nestjs/swagger";
import { IsOptional, IsString, MaxLength } from "class-validator";
import { QueryDto } from "/@/common/dto/query.dto";

export class GetAccountListDto extends QueryDto {
  @IsOptional()
  @ApiPropertyOptional({ description: "管理员名称" })
  @MaxLength(20, { message: "name长度不超过20" })
  @IsString({ message: "name必须为字符串" })
  readonly name: string;

  @IsOptional()
  @ApiPropertyOptional({ description: "账号" })
  @MaxLength(50, { message: "account长度不超过50" })
  @IsString({ message: "account必须为字符串" })
  readonly account: string;

  @IsOptional()
  @ApiPropertyOptional({ description: "用户状态" })
  @IsString({ message: "status必须为字符串" })
  readonly status: string;
}
